import React, { Component } from 'react'
import "./address.scss"
let BMap = window.BMap;

export default class address extends Component {
    
    componentDidMount(){
        this.map = new BMap.Map("bmap");
        this.map.centerAndZoom("深圳宝安国际机场",13);
        this.map.addControl(new BMap.NavigationControl());
        this.map.addControl(new BMap.ScaleControl());
        let point = new BMap.Point(113.837326,22.626282);
        let opts = {
            position: point,
            offset: new BMap.Size()
        }
        let label = new BMap.Label("<div class='circle'><span>" + "宝安周边" +"</span><span>"+ 666 + "家可品尝</span><div>",opts);
        this.map.addOverlay(label);
        label.setStyle({
            "background-color":"transparent",
            border:"none"
        })
    }
    render() {
        return (
            <div style={{height:"100%"}}>
              <div id="bmap" style={{width:"100wh",height:"100%"}}>
              <input type="button" value="样式1" onclick="openInfoWindow1()"/>
              </div>
            </div>
        )
    }
}
